'use client';

import { useState } from 'react';
import JobList from '../components/JobList';
import JobForm from '../components/JobForm';

export default function JobsPage() {
  const [showJobForm, setShowJobForm] = useState(false);

  const handleCreateJob = () => {
    setShowJobForm(true);
  };

  const handleBackToList = () => {
    setShowJobForm(false);
  };

  if (showJobForm) {
    return <JobForm onBack={handleBackToList} />;
  }

  return <JobList onCreateNew={handleCreateJob} />;
} 